package com.pansoft.openplanet.adapter;

import android.content.Context;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.pansoft.openplanet.R;
import com.pansoft.openplanet.bean.PointRecord;

import java.util.List;

/**
 * Created by will on 18-4-24.
 */

public class PointsRecordAdapter extends RecyclerView.Adapter<PointsRecordAdapter.PointRecordViewHolder>{

    private Context context;
    private List<PointRecord> items;

    public PointsRecordAdapter(Context context, List<PointRecord> items) {
        this.context = context;
        this.items = items;
    }

    @Override
    public PointRecordViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context)
                .inflate(R.layout.open_planet_item_points_record, parent, false);
        return new PointRecordViewHolder(view);
    }

    @Override
    public void onBindViewHolder(PointRecordViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 20;
    }

    public class PointRecordViewHolder extends RecyclerView.ViewHolder {

        TextView tvCategory, tvTime, tvPoints;

        public PointRecordViewHolder(View itemView) {
            super(itemView);
            tvCategory = itemView.findViewById(R.id.tv_category);
            tvTime = itemView.findViewById(R.id.tv_time);
            tvPoints = itemView.findViewById(R.id.tv_points);
        }
    }
}
